/**
  renderer.h - Created by Timothy Morey on 3/19/2012.

  This file provides the interface into the renderer system, which is made up 
  of many single-purpose renderer implementations.  The functions defined in
  this file help dispatch render requests to the appropriate implementations.
*/

#ifndef __RENDERER_H
#define __RENDERER_H

#include "color-ramp.h"
#include "data-schema.h"
#include "frame-buffer.h"
#include "grid-mask.h"
#include "libnvn.h"

typedef enum
{
  RendererTypeUnknown    = 0,
  RendererTypeShadedGrid = 1,
  RendererTypePixelMap   = 2
} RendererType;

EXPORT int DrawMaskedShadedGridFrame(GridMaskDef mask, ColorRamp ramp,
                                     DataGridSchema valueSchema, int xdim, int ydim,
                                     Variant minval, Variant maxval,
                                     char* valueBuffer, int valuelen,
                                     DataGridSchema maskSchema, 
                                     char* maskBuffer, int masklen,
                                     char* pixbuf, int pixbuflen);

EXPORT int DrawPixmapFrame(char* buf, int width, int height, 
                           unsigned int format, unsigned int type);

EXPORT int DrawShadedGridFrame(ColorRamp ramp, DataGridSchema valueSchema, 
                               int xdim, int ydim, Variant minval, Variant maxval,
                               char* valueBuffer, int valuelen,
                               char* pixbuf, int pixbuflen);

#endif
